package com.enjava.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.enjava.Alumno;
import com.enjava.Servicio;

@Controller
public class Controlador {
	
	
	@Autowired
	Alumno alumnoBean;
	
	@Autowired
	Servicio servicio;
	
	
	
    public Alumno getAlumnoBean() {
		return alumnoBean;
	}



	public void setAlumnoBean(Alumno alumnoBean) {
		alumnoBean = alumnoBean;
	}



	@RequestMapping("/helloWorld")
    public String helloWorld(Model model) {
        model.addAttribute("message", "Hello World: "+servicio.dameSaludo());
        return "helloWorld";
    }

}
